<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich">
	
	<h:panelGrid columns="2">
		<s:link view="/PostsPorAutor.xhtml" action="#{leituraCtrl.lerPostsPorAutor}" propagation="join">
			<s:graphicImage value="#{autor.imagem}">
				<s:transformImageSize maintainRatio="true" width="180" />
			</s:graphicImage>
			<f:param name="usuarioId" value="#{autor.id}" />
		</s:link>	
		<h:panelGrid columns="1">
			<s:link view="/PostsPorAutor.xhtml" action="#{leituraCtrl.lerPostsPorAutor}" propagation="join">
				<p><h:outputText value="#{autor.nome}" /></p>
				<f:param name="usuarioId" value="#{autor.id}" />
			</s:link>
			<h:outputText value="Seguido por: #{autor.quantidadeFavoritos}" />
			<h:outputText value="Seguindo: #{autor.usuarioFavoritoList.size}" />
			<h:outputText value="#{messages.creditos}: #{autor.saldo}" />
			<h:outputFormat rendered="#{not empty autor.mediaAvaliacoes}">
				<p>
					<h:outputText value="#{messages.media} " />
					<h:outputText value="#{autor.mediaAvaliacoes}">
						<f:convertNumber maxFractionDigits="2" minFractionDigits="2" />
					</h:outputText>
				</p>
			</h:outputFormat>
		</h:panelGrid>
	</h:panelGrid>
	
</ui:composition>